package com.itany.boot.service.impl;

import com.itany.boot.dao.UserDao;
import com.itany.boot.entity.User;
import com.itany.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/16 13:40
 * Version:1.0-SNAPSHOT
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
public class UserServiceImpl implements UserService {

    @Autowired(required = false)
    private UserDao userDao;

    @Override
    public List<User> findAll() {
        return userDao.selectAll();
    }
}
